<template>
  <div>
      <List></List>
      <ul>
          <li :class="[it.includes(index)?'red':'']" v-for="(item,index) in items" :key="item.id" v-html="item"></li>
      </ul>
  </div>
</template>

<script>
import List from '@/components/demoList'
export default {
  name:'vfor',
  components:{
      List
  },
  data(){
      return{
          items:[1,2,3,4,5,6,7,8,9],
          it:[2,3,6,8]
      }
  }
}
</script>

<style lang="less" scoped>
    .red{
        background-color: red;
    }
</style>
